package cn.sys.utils;

import cn.sys.domain.Menu;
import cn.sys.service.MenuService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

/**
 * @author Mxb
 * @version 1.0
 * @date 2020/5/27 16:33
 */
public class RedisTest {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("classpath:applicationContext.xml");
        MenuService menuService = context.getBean(MenuService.class);
        //接下来的操作就和java里面一样的了
        List<Menu> list = menuService.findAllMenuForList();
        for (Menu menu : list) {
            System.out.println(menu);
        }
    }
}